<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<script>
document.onclick = function(){
	if(document.documentElement.scrollTop)
	{
		alert(document.documentElement.scrollTop);
	}else
	{
		alert(document.body.scrollTop);		
	}
};
</script>
</head>

<body style="height: 2000px">

</body>
</html>
